<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <title>苹果大数据应用平台</title>
    <link rel="stylesheet" href="../Lib/iconfont/iconfont.css" />
    <link rel="stylesheet" href="../Lib/scroll/jquery.scrollbar.css" />
    <link rel="stylesheet" href="../css/common.css" />
    <script src="../Lib/jquery-1.12.4.min.js"></script>
    <script src="../Lib/time-scrollbar.js"></script>
    <script src="../Lib/scroll/jquery.scrollbar.min.js"></script>
</head>
<body class="production_status">
<div class="head">
    <h3 class="title">
        <div class="logo icon-logo"></div>
        <div class="line"></div>
        <div class="name">苹果大数据应用平台</div>
    </h3>
    <div class="navigation">
        <ul class="nav">
            <li class="nav-item index"><a href="index.html">首页</a></li>
            <li class="nav-item apple-product"><a href="apple_product.html">苹果生产</a></li>
            <li class="nav-item apple-consume"><a href="consume_situation.html">苹果消费</a></li>
            <li class="nav-item commerce"><a href="trade_situation.html">对外贸易</a></li>
            <li class="nav-item market-price"><a href="price_monitor.html">市场价格</a></li>
            <li class="nav-item cost-income"><a href="income_cost.html">成本收益</a></li>
        </ul>
        <div class="profile">
            <button><i class="iconfont icon-yonghu"></i></button>
            <button><i class="iconfont icon-shezhi"></i></button>
            <button><i class="iconfont icon-tuichu"></i></button>
        </div>
    </div>
</div>

<div class="wrapper">
<div class="nav-bar-bg">
    <dl class="nav-bar">
        <dt class="navbar-item production_status">
            <h2><i class="iconfont icon-fenxi"></i><a href="apple_product.html">生产现状</a><i class="iconfont icon-arrowright"></i></h2>
            <ul>
                <li><a href="#production_status_空间分布">空间分布</a></li>
                <li><a href="#production_status_历史演变">历史演变</a></li>
                <!--<li><a href="#production_status_生产占比">生产占比</a></li>
                <li><a href="#production_status_品种结构">品种结构</a></li>
                <li><a href="#production_status_树龄结构">树龄结构</a></li>
                <li><a href="#production_status_25年以上老龄苹果园分布">25年以上老龄苹果园分布</a></li>
                <li><a href="#production_status_果农年龄结构">果农年龄结构</a></li>
                <li><a href="#production_status_果农老龄化预测">果农老龄化预测</a></li>-->
            </ul>
        </dt>
        <dt class="navbar-item produce_advantage" id="section-2">
            <h2><i class="iconfont icon-chanqu"></i><a href="produce_advantage.html">产区优势</a><i class="iconfont icon-arrowright"></i></h2>
            <ul>
                <li><a href="#produce_advantage_规模优势">规模优势</a></li>
                <li><a href="#produce_advantage_效率优势">效率优势</a></li>
                <li><a href="#produce_advantage_效益优势">效益优势</a></li>
                <!--<li><a href="#produce_advantage_产区优势历史演变">产区优势历史演变</a></li>-->
            </ul>
        </dt>
        <dt class="navbar-item crop_weather" id="section-3">
            <h2><i class="iconfont icon-qixiang"></i><a href="crop_weather.html">作物气象</a><i class="iconfont icon-arrowright"></i></h2>
            <ul>
                <li><a href="#crop_weather_影响因素">影响因素</a></li>
                <li><a href="#crop_weather_灾害临界值">灾害临界值</a></li>
                <li><a href="#crop_weather_灾害监测">灾害监测</a></li>
                <li><a href="#crop_weather_单产预测">单产预测</a></li>
            </ul>
        </dt>
        <dt class="navbar-item globe_apple" id="section-4">
            <h2><i class="iconfont icon-quanqiu"></i><a href="globe_apple.html">全球生产</a><i class="iconfont icon-arrowright"></i></h2>
            <ul>
                <li><a href="#globe_apple_空间分布">空间分布</a></li>
                <li><a href="#globe_apple_历史演变">历史演变</a></li>
                <li><a href="#globe_apple_生产占比">生产占比</a></li>
            </ul>
        </dt>
    </dl>
</div>

<div class="cont">
    <div id="production_status_空间分布" class="section space-distributed">
        <div class="sec-top">
            <h3 class="pub-title">空间分布</h3>
            <div class="else">
                <ul class="pub-radio maptab-nav">
                    <li class="active">种植面积</li>
                    <li>产量</li>
                </ul>
            </div>
			<div class="help mrl20">
				<button><i class="iconfont icon-wenhao"></i></button>
				<div class="help-ct">
					<div class="diy-scroll">
						<p class='help-title'>（1）数据来源</p>
						<p>农业部</p>
					</div>
				</div>
			</div>
        </div>
        <div class="sec-ct maptab-ct">
            <div>
                <div class="sec-part" style="position: relative;">
                    <div class="section-desc special-center">
                        <span class="map-year">2015</span><span>年</span><span class="map-region">全国</span><span>苹果</span><span class="map-status">种植面积</span><span class="map-data strong-gold">3500</span><span class="map-unites">万亩</span>
                    </div>
                    <div id="space-distributed" class="one" style="width: 100%;">
                        <div class="topName">
                            <div>全国</div>
                        </div>
                        <div class="map"></div>
                        <div class="tooltip"></div>
                        <div id="space-distributed-time" style="z-index: 99;"></div>
                    </div>
                </div>
            </div>
           <!--  <div class="din">
                <div class="sec-part">
                    <div id="space-distributed" class="one">
                        <div class="topName"></div>
                        <div class="map"></div>
                        <div class="tooltip"></div>
                        <div id="space-distributed-time" style="z-index: 99;"></div>
                    </div>
                </div>
            </div> -->
        </div>
    </div>
    <div id="production_status_历史演变" class="section history">
        <div class="sec-top">
            <h3 class="pub-title">历史演变</h3>
            <div class="else">
                <div class="pub-time">
                    <dl class="fixtime">
                        <div class="time-des">时间：</div>
                        <div class="time-txt">2008-2012</div>
                    </dl>
                    <div class="another-time">
                        <ul class="time-list scrollbar-inner">
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2015-2017</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2010-2014</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2005-2009</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2000-2004</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>1995-1999</span>
                                </label>
                            </li>
                        </ul>
                        <div class="yesorno-btn">
                            <button class="time-yes" style="margin-right: 8px;">确认</button>
                            <button class="time-no">清除</button>
                        </div>
                    </div>
                </div>

                <div class="pub-check">
                    <dl class="fixlocation">
                        <dt>地区：</dt>
                        <dd class="locations">
                            <span data-areaid="00">全球</span>
                             <span data-areaid="37">陜西</span>
                             <span data-areaid="61">山东</span>
                        </dd>
                    </dl>
                    <div class="another-location">
                        <span class="for-pop">分省</span>
                        <div class="pop-areas">
                            <ul class="areas scrollbar-inner">
                                <li class="area-item">
                                    <label>
                                        <input type="checkbox" />
                                        <i class="checkbox iconfont"></i>
                                        <span>全国</span>
                                    </label>
                                </li>
                                <li class="area-item">
                                    <label>
                                        <input type="checkbox" />
                                        <i class="checkbox iconfont"></i>
                                        <span>北京市</span>
                                    </label>
                                </li>
                                <li class="area-item">
                                    <label>
                                        <input type="checkbox" />
                                        <i class="checkbox iconfont"></i>
                                        <span>天津市</span>
                                    </label>
                                </li>
                                <li class="area-item">
                                    <label>
                                        <input type="checkbox" />
                                        <i class="checkbox iconfont"></i>
                                        <span>河北省</span>
                                    </label>
                                </li>
                                <li class="area-item">
                                    <label>
                                        <input type="checkbox" />
                                        <i class="checkbox iconfont"></i>
                                        <span>山西省</span>
                                    </label>
                                </li>
                            </ul>
                            <div class="yesorno-btn">
                                <button class="yes" style="margin-right: 30px;">确认</button>
                                <button class="no">清除</button>
                            </div>
                        </div>
                    </div>
                </div>
                <ul class="pub-radio">
                    <li class="active">种植面积</li>
                    <li>产量</li>
                    <li>单产</li>
                </ul>
                <button class="download"><i class="iconfont icon-xiazai"></i></button>
            </div>
			<div class="help mrl20">
				<button><i class="iconfont icon-wenhao"></i></button>
				<div class="help-ct">
					<div class="diy-scroll">
						<p class='help-title'>（1）数据来源</p>
						<p>农业部</p>
					</div>
				</div>
			</div>

        </div>
        <div class="section-desc">
            <span class="des-year">2011-2014</span><span>年，</span><span class="history-area">全国</span><span>苹果</span><span class="desc-status">种植面积</span><span>年平均增长率</span><span class="strong-gold desc-rate">4</span><span>%</span>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="history" class="echart-box"></div>
                </div>
                <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <!--<div id="production_status_生产占比" class="section occupy">
        <div class="sec-top">
            <h3 class="pub-title">生产占比</h3>
            <div class="else">
                <div class="pub-time">
                    <dl class="fixtime">
                        <div class="time-des">时间：</div>
                        <div class="time-txt">2008-2012</div>
                    </dl>
                    <div class="another-time">
                        <ul class="time-list scrollbar-inner">
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2015-2017</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2010-2014</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2005-2009</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>2000-2004</span>
                                </label>
                            </li>
                            <li class="time-item">
                                <label>
                                    <input type="checkbox" name="">
                                    <i class="checkbox iconfont"></i>
                                    <span>1995-1999</span>
                                </label>
                            </li>
                        </ul>
                        <div class="yesorno-btn">
                            <button class="time-yes" style="margin-right: 8px;">确认</button>
                            <button class="time-no">清除</button>
                        </div>
                    </div>
                </div>
              &lt;!&ndash;<div class="pub-icon tab-nav">
                    <button class="icon-btn active"><i class="iconfont icon-tongji"></i></button>
                    <button class="icon-btn"><i class="iconfont icon-caidan"></i></button>
                </div> &ndash;&gt;
                <div class="currentArea">
                    <span>当前地区： </span>
                    <span class="current-area" data-areaid="00">全国</span>
                </div>
                <ul class="pub-radio">
                    <li class="active">种植面积</li>
                    <li>产量</li>
                </ul>
                <button class="download"><i class="iconfont icon-xiazai"></i></button>
            </div>
			<div class="help mrl20">
				<button><i class="iconfont icon-wenhao"></i></button>
				<div class="help-ct">
					<div class="diy-scroll">
						<p class='help-title'>（1）数据来源</p>
						<p>农业部</p>
					</div>
				</div>
			</div>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div>
                        <div class="echart-des">
                            <span class="current-area">全国</span><span class="new-name1">苹果园</span>占<span class="new-name2">果园</span><span class="newdanwei">种植面积</span><span>比重走势</span>
                        </div>
                        <div id="occupy1" class="echart-box"></div>
                    </div>
                    <div>
                        <div class="echart-des">
                            <span class="echart-year">2011年</span><span class="current-area">全国</span><span class="new-name1">苹果园</span>占<span class="new-name2">果园</span><span class="newdanwei">种植面积</span><span>比重</span>
                        </div>
                        <div id="occupy2" class="echart-box"></div>
                    </div>
                </div>
                &lt;!&ndash; <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div> &ndash;&gt;
            </div>
            <div class="din">
                <table class="sheet">
                    <thead>
                        <tr>
                            <th></th>
                            <th>2010年</th>
                            <th>2011年</th>
                            <th>2012年</th>
                            <th>2013年</th>
                            <th>2014年</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>全国</td>
                            <td><input disabled="" type="text" value="1001" /></td>
                            <td><input disabled="" type="text" value="1002" /></td>
                            <td><input disabled="" type="text" value="1003" /></td>
                            <td><input disabled="" type="text" value="1004" /></td>
                            <td><input disabled="" type="text" value="1005" /></td>
                            <td class="sheet-modify">修改</td>
                        </tr>
                        <tr>
                            <td>山东</td>
                            <td><input disabled="" type="text" value="1001" /></td>
                            <td><input disabled="" type="text" value="1002" /></td>
                            <td><input disabled="" type="text" value="1003" /></td>
                            <td><input disabled="" type="text" value="1004" /></td>
                            <td><input disabled="" type="text" value="1005" /></td>
                            <td class="sheet-modify">修改</td>
                        </tr>
                        <tr>
                            <td>陕西</td>
                            <td><input disabled="" type="text" value="1001" /></td>
                            <td><input disabled="" type="text" value="1002" /></td>
                            <td><input disabled="" type="text" value="1003" /></td>
                            <td><input disabled="" type="text" value="1004" /></td>
                            <td><input disabled="" type="text" value="1005" /></td>
                            <td class="sheet-modify">修改</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>-->
    <!--<div id="production_status_品种结构" class="section variety-structure">
        <div class="sec-top">
            <h3 class="pub-title">品种结构</h3>
            <div class="else">
                <ul class="pub-radio">
                    <li class="active">种植面积</li>
                    <li>产量</li>
                </ul>
                <button class="download"><i class="iconfont icon-xiazai"></i></button>
            </div>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="variety-structure1" class="echart-box"></div>
                    <div>
                        <div class="echart-des">
                            <span class="echart-year">2011年</span><span>苹果品种结构</span>
                        </div>
                        <div id="variety-structure2" class="echart-box"></div>
                    </div>
                </div>
                <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="production_status_树龄结构" class="section tree-structure">
        <div class="sec-top">
            <h3 class="pub-title">树龄结构</h3>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="tree-structure1" class="echart-box"></div>
                    <div>
                        <div class="echart-des">
                            <span class="echart-year">2011年</span><span>山东</span><span>苹果园树龄结构</span>
                        </div>
                        <div id="tree-structure2" class="echart-box"></div>
                    </div>
                </div>
                <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="production_status_25年以上老龄苹果园分布" class="section beyondtf">
        <div class="sec-top">
            <h3 class="pub-title">25年以上老龄苹果园分布</h3>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="beyondtf" class="one">
                        <div class="topName"></div>
                        <div class="map"></div>
                        <div id="beyondtf-time" style="z-index: 99;"></div>
                    </div>
                    <div>
                        <div class="section-desc">
                            <span>2011-2014年，全球苹果年平均增长率<span class="strong-gold">4％</span>，2014年突破<span class="strong-gold">8200</span>万吨</span>
                        </div>
                        <div class="rank charts-tab">
                            <ul class="tab-nav">
                                <li class="active">排名</li>
                                <li>占比</li>
                            </ul>
                            <div class="tab-ct">
                                <div id="rank" style="height: 220px;" class="echart-box"></div>
                                <div id="proportion" class="echart-box din" style="width: 100%; height: 220px;"></div>
                            </div>
                        </div>
                        <div class="desc-edit">
                            <div class="top">
                                <span class="desc-word">描述</span>
                                <button class="fr edit-btn">
                                    <i class="iconfont icon-bianji"></i>
                                    <span>编辑</span>
                                </button>
                            </div>
                            <div class="desc-ct">
                                <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="production_status_果农年龄结构" class="section farmersage-structure">
        <div class="sec-top">
            <h3 class="pub-title">果农年龄结构</h3>
            <div class="else">
                <div class="calendar">
                    <span>选择时间：</span>
                    <input id="DatePicker" onclick="WdatePicker({el:'DatePicker',highLineWeekDay:false,onpicking:timepick,dateFmt:'yyyy',qsEnabled:false,autoShowQS:false,isShowClear:false,isShowToday:false})" type="text" class="p_myDatePicker" value="2017"/>
                </div>
                <button class="download"><i class="iconfont icon-xiazai"></i></button>
            </div>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="farmersage-structure1" class="echart-box"></div>
                    <div id="farmersage-structure2" class="echart-box"></div>
                </div>
                <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="production_status_果农老龄化预测" class="section farmersage-forecast">
        <div class="sec-top">
            <h3 class="pub-title">果农老龄化预测</h3>
            <div class="else">
                <div class="calendar">
                    <span>选择时间：</span>
                    <input id="DatePicker2" onclick="WdatePicker({el:'DatePicker2',highLineWeekDay:false,onpicking:forcast,dateFmt:'yyyy',qsEnabled:false,autoShowQS:false,isShowClear:false,isShowToday:false})" type="text" class="p_myDatePicker" value="2017"/>
                </div>
                <button class="download"><i class="iconfont icon-xiazai"></i></button>
            </div>
        </div>
        <div class="sec-ct tab-ct">
            <div>
                <div class="sec-part">
                    <div id="farmersage-forecast1" class="echart-box"></div>
                    <div id="farmersage-forecast2" class="echart-box"></div>
                </div>
                <div class="desc-edit">
                    <div class="top">
                        <span class="desc-word">描述</span>
                        <button class="fr edit-btn">
                            <i class="iconfont icon-bianji"></i>
                            <span>编辑</span>
                        </button>
                    </div>
                    <div class="desc-ct">
                        <textarea class="edit-ct scrollbar-inner" disabled="">2011-2014年，全球苹果产量年平均变化率4%，2014年产量8200万吨。中国苹果产量，年平均变化率3.5%，2014年产量4090万吨。美国苹果产量年平均变化率4%，2014年产量519万吨。</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>-->
</div>


</div>

<!-- 图片背景 -->
<div class="body-bg">
    <img src="../images/bg_body.jpg">
</div>

<script src="../Lib/DatePicker/WdatePicker.js"></script>
<script src="../Lib/Echarts/echarts.common.min.js"></script>
<script src="../Lib/Echarts/echarts-engine.js"></script>
<script type="text/javascript" src="../Lib/Echarts/china.js"></script>
<script src="../js/public.js"></script>
<script src="../js/chart-map-library.min.js"></script>
<script src="../js/unite.js"></script>
<!-- <script src="../js/index.js"></script> -->
<!--<script src="../js/apple_product.js"></script>-->
<script type="text/javascript">
    $(function () {
        var MUTI = {
            mapDir: './../',
            mapJson: './../Lib/data/json/',
            starDot: '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:',
            endDot: '"></span>',
            eventID: 'china',
            mapName: null,
            mapIndex: 0,
            slideCurrentTime: null,  // MUTI.spaceTimeData[MUTI.spaceTimeData.length - 1]
            notnum: 0,
            valueArea: '万亩',  // 种植面积
            yield: '万吨',     // 产量
            danchan: '公斤/亩', // 单产
            timeFirstFlag: true,
            time1: '',
            time2: ''
        };
        // 图例颜色
        function getColor(params) {
            var areaColor = [];
            switch (params) {
                case '种植面积':
                    areaColor = ['#FBFBFF', '#DDDDFF', '#B9B9FF', '#9393FF', '#6A6AFF', '#8600FF'];
                    break;
                case '产量':
                    areaColor = ['#FBFBFF', '#F5FFE8', '#CEFFCE', '#79FF79', '#28FF28', '#00DB00']
                    break;
                default:
                    areaColor = ['#FBFBFF', '#DDDDFF', '#B9B9FF', '#9393FF', '#6A6AFF', '#8600FF'];
            }
            return areaColor;
        }
        // 初始化地图描述
        function initMapDesc(data) {
            // console.log(JSON.stringify(data))
            var common = {
                status: getDanwei(".space-distributed"),
                time: MUTI.currentTime || MUTI.slideCurrentTime
            };
            // var data = data.data;

            // 万吨 万亩 单位
            switch (common.status) {
                case '种植面积':
                    common.unites = MUTI.valueArea;
                    break;
                case '产量':
                    common.unites = MUTI.yield;
                    break;
                default:
                    common.unites = MUTI.valueArea;
            }
            // 地区, 如果 没有地区，那么 就取前一次 存起来的 地区
            if (data) {
                common.region = data.name;
                localStorage.setItem('currentArea', common.region);
            } else {
                common.region = localStorage.getItem('currentArea');
            }

            if (data.value) {
                if (common.status === '产量') {
                    common.value = parseInt(data.value).toFixed(0);
                }
            } else {
                if (common.status === '产量') {
                    common.value = MUTI.notnum;
                }
            }

            if (data.valueArea) {
                if (common.status === '种植面积') {
                    common.value = parseInt(data.valueArea).toFixed(0);
                }
            } else {
                if (common.status === '种植面积') {
                    common.value = MUTI.notnum;
                }
            }

            $(".map-year").text(common.time);
            $(".map-region").text(common.region);
            $(".map-status").text(common.status);
            $(".map-data").text(common.value);
            $(".map-unites").text(common.unites);
        }
        // 模拟数据
        var fakeData1 = {
            areaData: [
                {name: '陕西',value: 1057,valueAreapm: 1, itemStyle: {normal: {areaColor: '#8600FF'}}},
                {name: '山东',value: 452,valueAreapm: 2, itemStyle: {normal: {areaColor: '#6A6AFF'}}},
                {name: '甘肃',value: 441,valueAreapm: 3, itemStyle: {normal: {areaColor: '#9393FF'}}},
                {name: '河北',value: 363,valueAreapm: 4, itemStyle: {normal: {areaColor: '#B9B9FF'}}},
                {name: '河南',value: 235,valueAreapm: 5, itemStyle: {normal: {areaColor: '#DDDDFF'}}},
                {name: '辽宁',value: 233,valueAreapm: 6, itemStyle: {normal: {areaColor: '#FBFBFF'}}},
                {name: '山西',value: 225,valueAreapm: 7, itemStyle: {normal: {areaColor: '#fffbff'}}}
            ],
            pieces: [
                {min: 453, max: 1057},
                {min: 442, max: 452},
                {min: 364, max: 441},
                {min: 236, max: 363},
                {min: 234, max: 235},
                {min: 226, max: 233},
                {min: 0, max: 225}
            ],
            dis: '种植面积'
        };
        var fakeData2 = {
            areaData: [
                {name: '陕西',value: 2057,valueAreapm: 1, itemStyle: {normal: {areaColor: '#8600FF'}}},
                {name: '山东',value: 1572,valueAreapm: 2, itemStyle: {normal: {areaColor: '#6A6AFF'}}},
                {name: '甘肃',value: 1421,valueAreapm: 3, itemStyle: {normal: {areaColor: '#9393FF'}}},
                {name: '河北',value: 1102,valueAreapm: 4, itemStyle: {normal: {areaColor: '#B9B9FF'}}},
                {name: '河南',value: 899,valueAreapm: 5, itemStyle: {normal: {areaColor: '#DDDDFF'}}},
                {name: '辽宁',value: 789,valueAreapm: 6, itemStyle: {normal: {areaColor: '#FBFBFF'}}},
                {name: '山西',value: 502,valueAreapm: 7, itemStyle: {normal: {areaColor: '#fffbff'}}}
            ],
            pieces: [
                {min: 1573, max: 2057},
                {min: 1422, max: 1572},
                {min: 1103, max: 1421},
                {min: 900, max: 1102},
                {min: 790, max: 899},
                {min: 503, max: 789},
                {min: 0, max: 502}
            ],
            dis: '产量'
        };
        function mapToggle(data) {
            var myChart_map = echarts.init(document.getElementsByClassName('map')[0]);
            var myChart_map_option = {
                title: {},
                tooltip: {
                    trigger: 'item'
                },
                visualMap: [{
                    left: 'left',
                    bottom: '100',
                    type: 'piecewise',
                    pieces: data.pieces,
                    itemHeight: 30,
                    itemGap: 0,
                    inRange: {
                        symbol: 'rect',
                        color: getColor(data.dis)
                    },
                    textStyle: {
                        color: ['#5cc1ff'],
                        fontWeight: 'bold'
                    }
                }],
                series: [
                    {
                        name: '',
                        type: 'map',
                        mapType: 'china',
                        roam: true,
                        zoom: 1.2,
                        scaleLimit: {
                            min:0.2,
                            max: 2,
                        },
                        label: {
                            normal: {
                                show: false
                            },
                            emphasis: {
                                show: false
                            }
                        },
                        tooltip: {
                            textStyle: {
                                align: 'left',
                                color: '#5cc1ff',
                                fontSize: '16'
                            },
                            backgroundColor: 'rgba(15, 52, 135, 0.5)',
                            borderWidth: '1',
                            borderColor: '#5cc1ff',
                            extraCssText: 'box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);',
                            formatter: function (params) {
                                return params.data.name + '<br/>'+data.dis+'：' + parseFloat(params.data.value || 0).toFixed(0).fontsize(5).fontcolor('#FAB407')+
                                    (data.dis==='种植面积'?MUTI.valueArea:MUTI.yield) +
                                    '<br/>排名：' + (!!params.data.valueAreapm?params.data.valueAreapm:0) +
                                    '<br/>占比：' + (((!!params.data.value?params.data.value:0)/3006)*100).toFixed(2) + '%';
                            }
                        },
                        data: data.areaData
                    }
                ]
            };
            myChart_map.setOption(myChart_map_option);
        }
        mapToggle(fakeData1);

        // 创建一个虚假的年份列表
        function yearList() {
            var date = [];
            for (var i = 0; i < 2016 - 1982 + 1; i++) {
                date.push(1982 + i)
            }
            return date;
        }
        MUTI.slideCurrentTime = yearList()[2016 - 1982];
        // 初始化时间轴
        var bar = new scrollBar({
            dom: document.getElementById('space-distributed-time'),
            height: 12,
            position: 'bottom',
            backgroundImage: MUTI.mapDir + 'images/scale-bg.png',
            withTime: true,
            slideStart: yearList()[2016 - 1982],
            slideBgImage: MUTI.mapDir + 'images/scroll-icon.png',
            data: yearList(),
            tooltipWidth: 48,
            tooltipHeight: 20,
            tooltipImage: MUTI.mapDir + 'images/tooltip.png'
        });
        bar.scrollChange(function(time) {
            MUTI.currentTime = time;
            if (!MUTI.areaname) {
                MUTI.areaname = '全国';
            } else if (MUTI.areaname === '中国') {
                MUTI.areaname = '全国';
            }
            // 在这里更具time 动态获取地图数据，重新渲染地图。
        });
        // 种植面积 产量 切换
        $(".space-distributed .pub-radio").on("click", "li", function() {
            var index = $(this).index() + 1;
            if (!MUTI.areaname) {
                MUTI.areaname = '全国';
            } else if (MUTI.areaname === '中国') {
                MUTI.areaname = '全国';
            }
            if (!MUTI.currentTime) {
                MUTI.currentTime = MUTI.slideCurrentTime;
            }
            if($(this).html() === '种植面积'){
                mapToggle(fakeData1);
            } else if($(this).html() === '产量'){
                mapToggle(fakeData2);
            }

            var fakeData = {
                "arankVale": [
                    "1057",
                    "452",
                    "441",
                    "363",
                    "235",
                    "233",
                    "225",
                    "103",
                    "76",
                    "58"
                ],
                "rankVale": [
                    "1100.78",
                    "978.13",
                    "438.58",
                    "428.62",
                    "365.58",
                    "360.11",
                    "256.6",
                    "136.58",
                    "57.17",
                    "42.09"
                ],
                "areasData": [
                    {
                        "name": "内蒙古",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            111.670799,
                            40.81831
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "重庆",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            106.504959,
                            29.533155
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "台湾",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            121.509064,
                            25.044333
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "海南",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            110.331192,
                            20.031971
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "吉林",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            125.324501,
                            43.886841
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "香港",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            114.173355,
                            22.320047
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "西藏",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            91.13221,
                            29.66036
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "天津",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            117.190186,
                            39.125595
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "黑龙江",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            126.642464,
                            45.756966
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "贵州",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            106.713478,
                            26.578342
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "安徽",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            117.283043,
                            31.861191
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "广东",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            113.28064,
                            23.125177
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "青海",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            101.778915,
                            36.623177
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "广西",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            108.320007,
                            22.82402
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "湖北",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            114.298569,
                            30.584354
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "四川",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            104.065735,
                            30.659462
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "上海",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            121.472641,
                            31.231707
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "浙江",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            120.15358,
                            30.287458
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "江西",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            115.892151,
                            28.676493
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "湖南",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            112.982277,
                            28.19409
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "福建",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            119.306236,
                            26.075302
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "澳门",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            113.549088,
                            22.198952
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "北京",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            116.405289,
                            39.904987
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "江苏",
                        "value": "",
                        "valueArea": "",
                        "geoCoord": [
                            118.76741,
                            32.041546
                        ],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 0,
                        "valueAreapm": 0
                    },
                    {
                        "name": "陕西",
                        "value": 1100,
                        "valueArea": 1057,
                        "geoCoord": [
                            108.948021,
                            34.263161
                        ],
                        "valuezb": 0.2507,
                        "valueAreazb": 0.3259,
                        "valuepm": 1,
                        "valueAreapm": 1
                    },
                    {
                        "name": "山东",
                        "value": 978,
                        "valueArea": 452,
                        "geoCoord": [
                            117.000923,
                            36.675808
                        ],
                        "valuezb": 0.2229,
                        "valueAreazb": 0.1394,
                        "valuepm": 2,
                        "valueAreapm": 2
                    },
                    {
                        "name": "河南",
                        "value": 438,
                        "valueArea": 235,
                        "geoCoord": [
                            113.665413,
                            34.757977
                        ],
                        "valuezb": 0.0998,
                        "valueAreazb": 0.0725,
                        "valuepm": 3,
                        "valueAreapm": 5
                    },
                    {
                        "name": "山西",
                        "value": 428,
                        "valueArea": 225,
                        "geoCoord": [
                            112.549248,
                            37.857014
                        ],
                        "valuezb": 0.0975,
                        "valueAreazb": 0.0694,
                        "valuepm": 4,
                        "valueAreapm": 7
                    },
                    {
                        "name": "河北",
                        "value": 365,
                        "valueArea": 363,
                        "geoCoord": [
                            114.502464,
                            38.045475
                        ],
                        "valuezb": 0.0832,
                        "valueAreazb": 0.1119,
                        "valuepm": 5,
                        "valueAreapm": 4
                    },
                    {
                        "name": "甘肃",
                        "value": 360,
                        "valueArea": 441,
                        "geoCoord": [
                            103.823555,
                            36.058041
                        ],
                        "valuezb": 0.082,
                        "valueAreazb": 0.136,
                        "valuepm": 6,
                        "valueAreapm": 3
                    },
                    {
                        "name": "辽宁",
                        "value": 256,
                        "valueArea": 233,
                        "geoCoord": [
                            123.429092,
                            41.796768
                        ],
                        "valuezb": 0.0583,
                        "valueAreazb": 0.0718,
                        "valuepm": 7,
                        "valueAreapm": 6
                    },
                    {
                        "name": "新疆",
                        "value": 136,
                        "valueArea": 103,
                        "geoCoord": [
                            87.617729,
                            43.792816
                        ],
                        "valuezb": 0.031,
                        "valueAreazb": 0.0318,
                        "valuepm": 8,
                        "valueAreapm": 8
                    },
                    {
                        "name": "宁夏",
                        "value": 57,
                        "valueArea": 58,
                        "geoCoord": [
                            106.278175,
                            38.46637
                        ],
                        "valuezb": 0.013,
                        "valueAreazb": 0.0179,
                        "valuepm": 9,
                        "valueAreapm": 10
                    },
                    {
                        "name": "云南",
                        "value": 42,
                        "valueArea": 76,
                        "geoCoord": [
                            102.71225,
                            25.040609
                        ],
                        "valuezb": 0.0096,
                        "valueAreazb": 0.0234,
                        "valuepm": 10,
                        "valueAreapm": 9
                    }
                ],
                "arankName": [
                    "陕西",
                    "山东",
                    "甘肃",
                    "河北",
                    "河南",
                    "辽宁",
                    "山西",
                    "新疆",
                    "云南",
                    "宁夏"
                ],
                "rankName": [
                    "陕西",
                    "山东",
                    "河南",
                    "山西",
                    "河北",
                    "甘肃",
                    "辽宁",
                    "新疆",
                    "宁夏",
                    "云南"
                ],
                "currentAreaData": [
                    {
                        "name": "全国",
                        "value": 4388,
                        "valueArea": 3243,
                        "geoCoord": [],
                        "valuezb": "",
                        "valueAreazb": "",
                        "valuepm": 1,
                        "valueAreapm": 1
                    }
                ]
            };
            initMapDesc(fakeData.currentAreaData[0])
        });
        // 历史演变

        // 假的数据
        // 全国种植面积
        /*var countryArea = [
                {
                    "name": "00",
                    "time": "2002",
                    "sumData": 2907.45,
                    "totalSumData": 1938.3,
                    "area": "",
                    "yield": "",
                    "rate": -6.19
                },
                {
                    "name": "00",
                    "time": "2003",
                    "sumData": 2850.75,
                    "totalSumData": 1900.5,
                    "area": "",
                    "yield": "",
                    "rate": -1.95
                },
                {
                    "name": "00",
                    "time": "2004",
                    "sumData": 2815.05,
                    "totalSumData": 1876.7,
                    "area": "",
                    "yield": "",
                    "rate": -1.25
                },
                {
                    "name": "00",
                    "time": "2005",
                    "sumData": 2835.45,
                    "totalSumData": 1890.3,
                    "area": "",
                    "yield": "",
                    "rate": 0.72
                },
                {
                    "name": "00",
                    "time": "2006",
                    "sumData": 2848.2,
                    "totalSumData": 1898.8,
                    "area": "",
                    "yield": "",
                    "rate": 0.45
                },
                {
                    "name": "00",
                    "time": "2007",
                    "sumData": 2942.7,
                    "totalSumData": 1961.8,
                    "area": "",
                    "yield": "",
                    "rate": 3.32
                },
                {
                    "name": "00",
                    "time": "2008",
                    "sumData": 2988.3,
                    "totalSumData": 1992.2,
                    "area": "",
                    "yield": "",
                    "rate": 1.55
                },
                {
                    "name": "00",
                    "time": "2009",
                    "sumData": 3073.67,
                    "totalSumData": 2049.11,
                    "area": "",
                    "yield": "",
                    "rate": 2.86
                },
                {
                    "name": "00",
                    "time": "2010",
                    "sumData": 3209.88,
                    "totalSumData": 2139.92,
                    "area": "",
                    "yield": "",
                    "rate": 4.43
                },
                {
                    "name": "00",
                    "time": "2011",
                    "sumData": 3265.98,
                    "totalSumData": 2177.32,
                    "area": "",
                    "yield": "",
                    "rate": 1.75
                },
                {
                    "name": "00",
                    "time": "2012",
                    "sumData": 3347.02,
                    "totalSumData": 2231.35,
                    "area": "",
                    "yield": "",
                    "rate": 2.48
                },
                {
                    "name": "00",
                    "time": "2013",
                    "sumData": 3408.3,
                    "totalSumData": 2272.2,
                    "area": "",
                    "yield": "",
                    "rate": 1.83
                },
                {
                    "name": "00",
                    "time": "2014",
                    "sumData": 3408.3,
                    "totalSumData": 2272.2,
                    "area": "",
                    "yield": "",
                    "rate": 0
                },
                {
                    "name": "00",
                    "time": "2015",
                    "sumData": 3460.8,
                    "totalSumData": 2307.2,
                    "area": "",
                    "yield": "",
                    "rate": 1.54
                },
                {
                    "name": "00",
                    "time": "2016",
                    "sumData": 3243.38,
                    "totalSumData": 2162.25,
                    "area": "",
                    "yield": "",
                    "rate": -6.28
                }
            ];
        // 全国种植面积变化率
        var countryRate = [
                {
                    "name": "00",
                    "time": "2002",
                    "sumData": 1938,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": -6.19
                },
                {
                    "name": "00",
                    "time": "2003",
                    "sumData": 1900,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": -1.95
                },
                {
                    "name": "00",
                    "time": "2004",
                    "sumData": 1876,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": -1.25
                },
                {
                    "name": "00",
                    "time": "2005",
                    "sumData": 1890,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 0.72
                },
                {
                    "name": "00",
                    "time": "2006",
                    "sumData": 1898,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 0.45
                },
                {
                    "name": "00",
                    "time": "2007",
                    "sumData": 1961,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 3.32
                },
                {
                    "name": "00",
                    "time": "2008",
                    "sumData": 1992,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 1.55
                },
                {
                    "name": "00",
                    "time": "2009",
                    "sumData": 2049,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 2.86
                },
                {
                    "name": "00",
                    "time": "2010",
                    "sumData": 2139,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 4.43
                },
                {
                    "name": "00",
                    "time": "2011",
                    "sumData": 2177,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 1.75
                },
                {
                    "name": "00",
                    "time": "2012",
                    "sumData": 2231,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 2.48
                },
                {
                    "name": "00",
                    "time": "2013",
                    "sumData": 2272,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 1.83
                },
                {
                    "name": "00",
                    "time": "2014",
                    "sumData": 2272,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 0
                },
                {
                    "name": "00",
                    "time": "2015",
                    "sumData": 2307,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": 1.54
                },
                {
                    "name": "00",
                    "time": "2016",
                    "sumData": 2162,
                    "totalSumData": "",
                    "area": "",
                    "yield": "",
                    "rate": -6.28
                }
            ];
        // 全国产量
        var countryTotal = [
            {
                "name": "00",
                "time": "2002",
                "sumData": 2886.15,
                "totalSumData": 1924.1,
                "area": "",
                "yield": "",
                "rate": -3.87
            },
            {
                "name": "00",
                "time": "2003",
                "sumData": 3165.27,
                "totalSumData": 2110.18,
                "area": "",
                "yield": "",
                "rate": 9.67
            },
            {
                "name": "00",
                "time": "2004",
                "sumData": 3551.33,
                "totalSumData": 2367.55,
                "area": "",
                "yield": "",
                "rate": 12.2
            },
            {
                "name": "00",
                "time": "2005",
                "sumData": 3601.67,
                "totalSumData": 2401.11,
                "area": "",
                "yield": "",
                "rate": 1.42
            },
            {
                "name": "00",
                "time": "2006",
                "sumData": 3908.89,
                "totalSumData": 2605.93,
                "area": "",
                "yield": "",
                "rate": 8.53
            },
            {
                "name": "00",
                "time": "2007",
                "sumData": 4178.99,
                "totalSumData": 2785.99,
                "area": "",
                "yield": "",
                "rate": 6.91
            },
            {
                "name": "00",
                "time": "2008",
                "sumData": 4476.99,
                "totalSumData": 2984.66,
                "area": "",
                "yield": "",
                "rate": 7.13
            },
            {
                "name": "00",
                "time": "2009",
                "sumData": 4752.12,
                "totalSumData": 3168.08,
                "area": "",
                "yield": "",
                "rate": 6.15
            },
            {
                "name": "00",
                "time": "2010",
                "sumData": 4989.5,
                "totalSumData": 3326.33,
                "area": "",
                "yield": "",
                "rate": 5
            },
            {
                "name": "00",
                "time": "2011",
                "sumData": 5397.72,
                "totalSumData": 3598.48,
                "area": "",
                "yield": "",
                "rate": 8.18
            },
            {
                "name": "00",
                "time": "2012",
                "sumData": 5773.61,
                "totalSumData": 3849.07,
                "area": "",
                "yield": "",
                "rate": 6.96
            },
            {
                "name": "00",
                "time": "2013",
                "sumData": 5952.39,
                "totalSumData": 3968.26,
                "area": "",
                "yield": "",
                "rate": 3.1
            },
            {
                "name": "00",
                "time": "2014",
                "sumData": 6138.48,
                "totalSumData": 4092.32,
                "area": "",
                "yield": "",
                "rate": 3.13
            },
            {
                "name": "00",
                "time": "2015",
                "sumData": 6392.01,
                "totalSumData": 4261.34,
                "area": "",
                "yield": "",
                "rate": 4.13
            },
            {
                "name": "00",
                "time": "2016",
                "sumData": 6582.3,
                "totalSumData": 4388.2,
                "area": "",
                "yield": "",
                "rate": 2.98
            }
        ];
        // 全国产量变化率
        var countryTotalRate = [
            {
                "name": "00",
                "time": "2002",
                "sumData": 1924,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": -3.87
            },
            {
                "name": "00",
                "time": "2003",
                "sumData": 2110,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 9.67
            },
            {
                "name": "00",
                "time": "2004",
                "sumData": 2367,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 12.2
            },
            {
                "name": "00",
                "time": "2005",
                "sumData": 2401,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 1.42
            },
            {
                "name": "00",
                "time": "2006",
                "sumData": 2605,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 8.53
            },
            {
                "name": "00",
                "time": "2007",
                "sumData": 2785,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 6.91
            },
            {
                "name": "00",
                "time": "2008",
                "sumData": 2984,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 7.13
            },
            {
                "name": "00",
                "time": "2009",
                "sumData": 3168,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 6.15
            },
            {
                "name": "00",
                "time": "2010",
                "sumData": 3326,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 5
            },
            {
                "name": "00",
                "time": "2011",
                "sumData": 3598,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 8.18
            },
            {
                "name": "00",
                "time": "2012",
                "sumData": 3849,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 6.96
            },
            {
                "name": "00",
                "time": "2013",
                "sumData": 3968,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 3.1
            },
            {
                "name": "00",
                "time": "2014",
                "sumData": 4092,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 3.13
            },
            {
                "name": "00",
                "time": "2015",
                "sumData": 4261,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 4.13
            },
            {
                "name": "00",
                "time": "2016",
                "sumData": 4388,
                "totalSumData": "",
                "area": "",
                "yield": "",
                "rate": 2.98
            }
        ];
        // 全国单产
        var countryPUY = [
            {
                "name": "00",
                "time": "2002",
                "sumData": 1489,
                "totalSumData": 661.78,
                "area": 1938.3,
                "yield": 1924.1,
                "rate": 2.47
            },
            {
                "name": "00",
                "time": "2003",
                "sumData": 1665.5,
                "totalSumData": 740.22,
                "area": 1900.5,
                "yield": 2110.18,
                "rate": 11.85
            },
            {
                "name": "00",
                "time": "2004",
                "sumData": 1892.32,
                "totalSumData": 841.03,
                "area": 1876.7,
                "yield": 2367.55,
                "rate": 13.62
            },
            {
                "name": "00",
                "time": "2005",
                "sumData": 1905.35,
                "totalSumData": 846.82,
                "area": 1890.3,
                "yield": 2401.11,
                "rate": 0.69
            },
            {
                "name": "00",
                "time": "2006",
                "sumData": 2058.62,
                "totalSumData": 914.94,
                "area": 1898.8,
                "yield": 2605.93,
                "rate": 8.04
            },
            {
                "name": "00",
                "time": "2007",
                "sumData": 2130.18,
                "totalSumData": 946.75,
                "area": 1961.8,
                "yield": 2785.99,
                "rate": 3.48
            },
            {
                "name": "00",
                "time": "2008",
                "sumData": 2247.26,
                "totalSumData": 998.78,
                "area": 1992.2,
                "yield": 2984.66,
                "rate": 5.5
            },
            {
                "name": "00",
                "time": "2009",
                "sumData": 2319.12,
                "totalSumData": 1030.72,
                "area": 2049.11,
                "yield": 3168.08,
                "rate": 3.2
            },
            {
                "name": "00",
                "time": "2010",
                "sumData": 2331.63,
                "totalSumData": 1036.28,
                "area": 2139.92,
                "yield": 3326.33,
                "rate": 0.54
            },
            {
                "name": "00",
                "time": "2011",
                "sumData": 2479.07,
                "totalSumData": 1101.81,
                "area": 2177.32,
                "yield": 3598.48,
                "rate": 6.32
            },
            {
                "name": "00",
                "time": "2012",
                "sumData": 2587.5,
                "totalSumData": 1150,
                "area": 2231.35,
                "yield": 3849.07,
                "rate": 4.37
            },
            {
                "name": "00",
                "time": "2013",
                "sumData": 2619.66,
                "totalSumData": 1164.29,
                "area": 2272.2,
                "yield": 3968.26,
                "rate": 1.24
            },
            {
                "name": "00",
                "time": "2014",
                "sumData": 2701.56,
                "totalSumData": 1200.69,
                "area": 2272.2,
                "yield": 4092.32,
                "rate": 3.13
            },
            {
                "name": "00",
                "time": "2015",
                "sumData": 2770.46,
                "totalSumData": 1231.31,
                "area": 2307.2,
                "yield": 4261.34,
                "rate": 2.55
            },
            {
                "name": "00",
                "time": "2016",
                "sumData": 3044.19,
                "totalSumData": 1352.97,
                "area": 2162.25,
                "yield": 4388.2,
                "rate": 9.88
            }
        ];
        // 全国单产变化率
        var countryPUYRate = [
            {
                "name": "00",
                "time": "2002",
                "sumData": 992,
                "totalSumData": "",
                "area": 1938.3,
                "yield": 1924.1,
                "rate": 2.47
            },
            {
                "name": "00",
                "time": "2003",
                "sumData": 1110,
                "totalSumData": "",
                "area": 1900.5,
                "yield": 2110.18,
                "rate": 11.85
            },
            {
                "name": "00",
                "time": "2004",
                "sumData": 1261,
                "totalSumData": "",
                "area": 1876.7,
                "yield": 2367.55,
                "rate": 13.62
            },
            {
                "name": "00",
                "time": "2005",
                "sumData": 1270,
                "totalSumData": "",
                "area": 1890.3,
                "yield": 2401.11,
                "rate": 0.69
            },
            {
                "name": "00",
                "time": "2006",
                "sumData": 1372,
                "totalSumData": "",
                "area": 1898.8,
                "yield": 2605.93,
                "rate": 8.04
            },
            {
                "name": "00",
                "time": "2007",
                "sumData": 1420,
                "totalSumData": "",
                "area": 1961.8,
                "yield": 2785.99,
                "rate": 3.48
            },
            {
                "name": "00",
                "time": "2008",
                "sumData": 1498,
                "totalSumData": "",
                "area": 1992.2,
                "yield": 2984.66,
                "rate": 5.5
            },
            {
                "name": "00",
                "time": "2009",
                "sumData": 1546,
                "totalSumData": "",
                "area": 2049.11,
                "yield": 3168.08,
                "rate": 3.2
            },
            {
                "name": "00",
                "time": "2010",
                "sumData": 1554,
                "totalSumData": "",
                "area": 2139.92,
                "yield": 3326.33,
                "rate": 0.54
            },
            {
                "name": "00",
                "time": "2011",
                "sumData": 1652,
                "totalSumData": "",
                "area": 2177.32,
                "yield": 3598.48,
                "rate": 6.32
            },
            {
                "name": "00",
                "time": "2012",
                "sumData": 1725,
                "totalSumData": "",
                "area": 2231.35,
                "yield": 3849.07,
                "rate": 4.37
            },
            {
                "name": "00",
                "time": "2013",
                "sumData": 1746,
                "totalSumData": "",
                "area": 2272.2,
                "yield": 3968.26,
                "rate": 1.24
            },
            {
                "name": "00",
                "time": "2014",
                "sumData": 1801,
                "totalSumData": "",
                "area": 2272.2,
                "yield": 4092.32,
                "rate": 3.13
            },
            {
                "name": "00",
                "time": "2015",
                "sumData": 1846,
                "totalSumData": "",
                "area": 2307.2,
                "yield": 4261.34,
                "rate": 2.55
            },
            {
                "name": "00",
                "time": "2016",
                "sumData": 2029,
                "totalSumData": "",
                "area": 2162.25,
                "yield": 4388.2,
                "rate": 9.88
            }
        ];*/
        function getDate(data, attr) {
            var needData = [];
            for (var i = 0; i < data.length; i++) {
                needData.push(data[i][attr])
            }
            return needData;
        }

        var title = $('.pub-radio').children('.active').html();
        var legend = ['全国'+title, '全国变化率'];
        // 历史演变切换
        $('.pub-radio').on('click', 'li', function (e) {
            e.preventDefault();
            if($(this).html() === '种植面积'){
                renderChart(legend, getDate(countryRate, 'totalSumData'), '种植面积', countryArea)
            } else if($(this).html() === '产量'){
                
            } else if($(this).html() === '单产'){

            }
        });
        renderChart()

        function renderChart() {
            var historyChart = echarts.init(document.getElementById('history'));

            var option = {
                grid: {
                    left: '50',
                    right: '50',
                    bottom: '30',
                    top: '100',
                    containLabel: true
                },
                legend: {
                    y: 'top',
                    x: 'right',
                    textStyle: {
                        color: "#fff"
                    },
                    data: ['全国种植面积', '全国变化率']
                },
                tooltip: {
                    trigger: 'axis',
                    textStyle: {
                        align: 'left',
                        color: '#5cc1ff',
                        fontSize: '16'
                    },
                    backgroundColor: 'rgba(15, 52, 135, 0.5)',
                    borderWidth: '1',
                    borderColor: '#5cc1ff',
                    extraCssText: 'box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);',
                    formatter: function (params) {
                        var str = '';
                        params.forEach(function(v) {
                            if (v.seriesType === 'bar') {
                                str += MUTI.starDot + v.color.colorStops[0].color + MUTI.endDot + v.seriesName + ": " + v.value + " " + "万亩" + "<br>";
                            } else {
                                str += MUTI.starDot + v.color + MUTI.endDot + v.seriesName + ": " + v.value + "%<br>";
                            }
                        });
                        return params[0].axisValueLabel + "<br>" + str;
                    },

                },
                xAxis: {
                    type: 'category',
                    show: true,
                    splitLine: { show: false },
                    axisLine: { lineStyle: { color: "#99aef8" } },
                    axisTick: { show: false },
                    axisLabel: {
                        textStyle: {
                            color: "#fff",
                            fontSize: 15
                        }
                    },
                    nameTextStyle: { color: "#fff" },
                    data: ['2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015'],
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                yAxis: [{
                    name: '种植面积（万亩）',
                    min: 0,
                    splitLine: { show: false },
                    axisLine: { lineStyle: { color: "#99aef8" } },
                    axisTick: { show: false },
                    axisLabel: {
                        textStyle: {
                            color: "#fff",
                            fontSize: 15
                        }

                    },
                    nameTextStyle: { color: "#fff" }
                }, {
                    name: '变化率（%）',
                    min: -6,
                    splitLine: { show: false },
                    axisLine: { lineStyle: { color: "#99aef8" } },
                    axisTick: { show: false },
                    axisLabel: {
                        textStyle: {
                            color: "#fff",
                            fontSize: 15
                        }

                    },
                    nameTextStyle: { color: "#fff" }
                }],
                series: [{
                    name: '全国种植面积',
                    type: 'bar',
                    smooth: true,
                    data: [20, 30, 22, 33,53, 32, 32, 33,34,43],
                    barWidth: '8%',
                    itemStyle: {
                        normal: {
                            barBorderRadius: 10,
                            borderColor: '#F10F0F',
                            borderColor: 'rgba(69,168,218,.8)',
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 1,
                                color: 'rgba(60, 134, 201,.8)'
                            }, {
                                offset: 0,
                                color: 'rgba(60, 134, 201,.4)'
                            }])

                        }
                    },
                    },
                    {
                        name: '全国变化率',
                        type: 'line',
                        smooth: true,
                        symbol: 'none',
                        yAxisIndex: 1,
                        data: [-4, -2, -2, -2.4,-4.3, -3.5, 2.9, 1.1,-3.2,4.1],
                        markLine: {

                        },
                        itemStyle: {
                            normal: {
                                color: 'rgba(69,168,218,.8)',
                            }
                        }
                    }],
                "dataZoom": [{
                    "show": true,
                    "height": 15,
                    "xAxisIndex": [0],
                    left: '50',
                    right: '50',
                    bottom: 0,
                    backgroundColor: '#1f2d70',
                    dataBackground: {
                        areaStyle: {
                            color: 'rgba(79, 140, 210, 0.4)'
                        },
                        lineStyle: {
                            opacity: 0.8,
                            color: '#8392A5'
                        }
                    },
                    fillerColor: 'rgba(4, 175, 246, 0.6)',
                    "start": 0,
                    "end": 100,
                    handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                    handleSize: '110%',
                    handleStyle: {
                        color: '#00ADFA',
                        shadowBlur: 0,
                        shadowColor: 'rgba(255, 0, 0, 1)',
                        shadowOffsetX: 0,
                        shadowOffsetY: 0
                    },
                    textStyle: {
                        color: "#11caff",
                        fontSize: '12'
                    },
                    borderColor: "#3458B4"
                }, {
                    "type": "inside",
                    "show": true,
                    "height": 15,
                    "start": 1,
                    "end": 35
                }],

            }

            historyChart.setOption(option);
        }






    });
</script>
</body>
</html>
